package com.soft.dao;

import com.soft.IBaseDao.IBaseDao;
import com.soft.pojo.Salary;
import com.soft.utils.DBUtil;

import java.util.List;

/**
 * @author ruoxi
 * @create 2021-12-27 11:26
 */
public class SalaryDaoImpl implements IBaseDao<Salary> {
    @Override
    public int add(Salary var1) {
        return 0;
    }

    @Override
    public int del(int var1) {
        return 0;
    }

    @Override
    public int update(Salary var1) {
        return 0;
    }

    @Override
    public List<Salary> selectByAll() {
        return DBUtil.query("select * from salary", Salary.class);
    }

    @Override
    public Salary selectByKey(Salary var1) {
        return null;
    }

    public List<Salary> selectSalaryRecordByPage(int currentPage,int currentCount) {
        return DBUtil.query("select s.id,s.eno,s.ename,s.date,s.money,e.job from salary s,emp e limit ?,?", Salary.class,currentPage,currentCount);
    }
}
